/**
 * 
 */
package com.roc.util.constant;

import org.apache.commons.lang3.StringUtils;

/**
 * @author Feng haitao
 */
public enum FrozenStatus {
	//状态 N 未冻结 Q 申请冻结 Y 已冻结
	 NO("冻结审核", "N"),
	 frozen("冻结申请", "Q"),
	 unfrozen("解冻申请", "U"),
	 OK("解冻审核","Y");
	 
	 
	 
	 
	 
	private String code;
	private String name;
	private boolean editAble;
	private boolean enabled;

	private FrozenStatus( String name,String code) {
		this.code = code;
		this.name = name;
		
	}

	public boolean isEditAble() {
		return editAble;
	}

	public boolean isEnabled() {
		return enabled;
	}

	public String getCode() {
		return code;
	}

	public String getName() {
		return name;
	}

	public static FrozenStatus valueOfCode(String code) {
		if (StringUtils.isBlank(code)) {
			throw new IllegalArgumentException("SysLogType code " + code
					+ " is blank");
		}
		for (FrozenStatus ms : values()) {
			if (ms.getCode().equals(code)) {
				return ms;
			}
		}
		throw new IllegalArgumentException("SysLogType code " + code
				+ " is not exist");
	}

}
